<template>
  <div class="user-info-detail">
    <div class="table w50">
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">企业名称</li>
          <li class="table-cell-content br0">{{formData.groupName}}</li>
          <li class="table-cell-title br0">企业地址</li>
          <li class="table-cell-content">{{formData.groupAddress}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">登录账号</li>
          <li class="table-cell-content br0">{{formData.loginName}}</li>
          <li class="table-cell-title br0">用户名称</li>
          <li class="table-cell-content">{{formData.userName}}</li>
        </ul>
      </div>
      <div class="table-row-group" >
        <ul class="table-row">
          <li class="table-cell-title br0">联系电话</li>
          <li class="table-cell-content br0">{{formData.mobileNo}}</li>
          <li class="table-cell-title br0">角色</li>
          <li class="table-cell-content">{{formData.roleName}}</li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
  import PcDialog from 'components/dialog';
  export default{
    props: ['userId'],
    components: {
      PcDialog
    },
    data() {
      return {
        formData: [],
        id: this.userId
      };
    },
    created() {
      this.initData();
    },
    methods: {
      // 根据用户ID获取用户的详细数据
      initData() {
        this.ajax({
          type: 'POST',
          url: '/uac/user/getUacUserById/' + this.id,
          data: {},
          success: (res) => {
            setTimeout(() => {
              this.$pcNProgress.done();
            }, 300);
            this.formData = res.result;
          }
        });
      }
    }
  };
</script>
<style>
  .user-info-detail {
    width: 958px;
  }
  .user-info-detail .table{
    display:table;
    border-collapse:collapse;
    border:1px solid #e5e5e5;
    width:100%;
    background:#ffffff;
  }
  .user-info-detail .table .table-row-group{
    display:table-row-group;
    width: 100%;
    border-top: 1px solid #e5e5e5;
    border-left:1px solid #e5e5e5;
  }
  .user-info-detail .table .table-row-group .table-row{
    display:table-row;
    height: 40px;
  }
  .user-info-detail .table .table-row-group .table-row .table-cell-title{
    display:table-cell;
    padding:0 5px;
    border-left:1px solid #e5e5e5;
    border-right:1px solid #e5e5e5;
    height: 40px;
    width: 160px;
    line-height: 40px;
    text-align:center;
    color: #4d4d4d;
  }
  .user-info-detail .table .table-row-group .table-row .table-cell-content{
    display:table-cell;
    padding:0 5px;
    border-left:1px solid #e5e5e5;
    border-right:1px solid #e5e5e5;
    height: 40px;
    width: 320px;
    line-height: 40px;
    text-indent: 20px;
    color: #1a1a1a;
  }
  .user-info-detail .table .table-row-group .table-row .br0{
    border-right:none;
  }
  .user-info-detail .el-table--border td{
    border-right:1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
  }
  .user-info-detail .table .w50 ul{
    box-sizing: border-box;
  }
  .user-info-detail .el-table--border td div{
    color:#000;
  }
  .user-info-detail .user-info-content{
    border-left:1px solid #e5e5e5;
    border-right:1px solid #e5e5e5;
    border-top:1px solid #e5e5e5;
    border-bottom:0px solid #e5e5e5;
    height: 40px;
    line-height: 40px;
    background:#ffffff;
    text-align: center;
    text-indent: 0px;
    font-size: 16px;
    color: #1a1a1a;
  }
</style>
